function Tb = FB(u)

global B;
global T_orbit;
global M_remain;

CbI = reshape(u(2:10),3,3);
t1 = (1:308)/308*T_orbit;
tc = u(1);
t_remain = rem(tc, T_orbit);

Bx = interp1(t1,B(:,1),t_remain,'spline');
By = interp1(t1,B(:,2),t_remain,'spline');
Bz = interp1(t1,B(:,3),t_remain,'spline');
BB = CbI*[Bx; By; Bz];
Tb = cross(M_remain,BB);
